/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.escom.administracion.dao.hibernate;

import com.escom.administracion.dao.DominioDAO;
import com.escom.administracionperfiles.hbm.dto.Dominio;
import com.escom.cliente.exception.DAOException;
import com.escom.hibernate.template.AdminSoportHibernate;
import java.io.Serializable;
import java.util.List;

/**
 *
 * @author yamil
 */
public class DominioDAOHBM extends AdminSoportHibernate implements DominioDAO,Serializable{

    @Override
    public void create(Dominio dominio) throws DAOException {
        save(dominio);
    }

    @Override
    public void edit(Dominio dominio) throws DAOException {

       update(dominio);

    }

    @Override
    public void remove(Dominio dominio) throws DAOException {
        //throw new UnsupportedOperationException("Not supported yet.");
        delete(dominio);
    }

    @Override
    public Dominio find(Object id) throws DAOException {
        return (Dominio) findByPrimaryKey(Dominio.class, id);
    }

    @Override
    public List<Dominio> findAll() throws DAOException {
        List<Dominio> l=findAll(Dominio.class);
        return l;
    }

    @Override
    public int count() {
        //throw new UnsupportedOperationException("Not supported yet.");
        return count();
    }


}
